package com.zhihuishu.micro.course.model;

import java.util.Date;

public class User implements java.io.Serializable {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1L;
	private Long id;
	// Fields
	// 用户名
	private String username;
	// 姓名
	private String realName;
	// 昵称
	private String nickName;
	private String password;
	// 电子邮件
	private String EMail;
	// 电话
	private String phoneNumber;
	// 头像地址
	private String headPicUrl;
	/* 头像尺寸图片 */
	private String smallPicUrl;
	// 生日
	private Date birthday;
	private Short EMailValidator;
	// 性别 0为男 1为女
	private String sex;

	private String source;
	/* 手机绑定状态 0表示未绑定，1表示已绑定 */
	private Integer bingType;
	/* 用户认证状态：0表示未实名认证，1表示已认证 */
	private Integer isauth;
	private String isDeleted;
	private Integer longinCount;
	private String ip;
	private Date lastLoginTime;
	private String state;
	private Short EMailAuthorityType;

	public String getIsDeleted() {
		return isDeleted;
	}

	public void setIsDeleted(String isDeleted) {
		this.isDeleted = isDeleted;
	}

	/** default constructor */
	public User() {
		super();
	}

	public User(Long id) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getRealName() {
		return this.realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getNickName() {
		return this.nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getEMail() {
		return this.EMail;
	}

	public void setEMail(String EMail) {
		this.EMail = EMail;
	}

	public String getPhoneNumber() {
		return this.phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public String getHeadPicUrl() {
		return this.headPicUrl;
	}

	public void setHeadPicUrl(String headPicUrl) {
		this.headPicUrl = headPicUrl;
	}

	public Date getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getSex() {
		return this.sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public Integer getBingType() {
		return bingType;
	}

	public void setBingType(Integer bingType) {
		this.bingType = bingType;
	}

	public Integer getIsauth() {
		return isauth;
	}

	public void setIsauth(Integer isauth) {
		this.isauth = isauth;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result
				+ ((username == null) ? 0 : username.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		User other = (User) obj;
		if (username == null) {
			if (other.username != null)
				return false;
		} else if (!username.equals(other.username))
			return false;
		return true;
	}

	public String getSmallPicUrl() {

		return smallPicUrl;
	}

	public void setSmallPicUrl(String smallPicUrl) {
		this.smallPicUrl = smallPicUrl;
	}

	public Integer getLonginCount() {
		return longinCount;
	}

	public void setLonginCount(Integer longinCount) {
		this.longinCount = longinCount;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Short getEMailValidator() {
		return this.EMailValidator;
	}

	public void setEMailValidator(Short EMailValidator) {
		this.EMailValidator = EMailValidator;
	}

	public Short getEMailAuthorityType() {
		return this.EMailAuthorityType;
	}

	public void setEMailAuthorityType(Short EMailAuthorityType) {
		this.EMailAuthorityType = EMailAuthorityType;
	}
}